Because a two-dimensional object defined in a vector format is provided by an expression, such as a Bezier curve or a spline curve, the two-dimensional object has a feature that it can be graphically drawn without any jaggy occurring even if it is enlarged or reduced like a bitmapped image.
For example, a TrueType outline font and an SVG (Scalable Vector Graphics) using W3C are examples of this vector graphics processing.
Furthermore, as a low level API (Application Programming Interface) of vector graphics, OpenVG specifications have been drawn up and a graphics library and hardware which comply with OpenVG have been developed.
In vector graphics, in order to display the jaggy of an edge portion smoothly, antialiasing drawing is needed.
As antialiasing drawing methods, for example, a super sampling method (refer to patent reference 1) of dividing a pixel into a plurality of subpixels, and calculating a luminance value from an occupation ratio of area, and a method (refer to patent reference 2) of calculating a luminance value from a distance from the center of a pixel are provided.
In accordance with the super sampling method or a multi-sample method, a pixel is further divided into smaller subpixels, and the value of the pixel is determined from the average of the values of these subpixels.
For example, one pixel is divided into 4×4=16 subpixels, each of the 16 virtual subpixels is subjected to drawing, and the average of the values of those subpixels is finally determined as the last value of the pixel.
Accordingly, in the case of using this method, because the drawing time increases in proportion to the number of subpixels, it is difficult to carry out real time drawing at a high speed.
Therefore, in order to implement the drawing at a high speed, it is necessary to perform the arithmetic processing on the subpixels in parallel, and hence the hardware scale increases.
In addition, in this method, the luminance value cannot be expressed without providing gradations (in the above-mentioned case, it can be expressed only with 16 gradations). Therefore, because the luminance value to be drawn is not calculated correctly, any edge line cannot be drawn smoothly. As a result, the occurrence of jaggy cannot be prevented certainly and the displayed image may degrade.
On the other hand, in accordance with the method of calculating the luminance value of a pixel from the distance from the center of the pixel to a straight line, the distance to the straight line has to be calculated for each pixel. Furthermore, in a case of carrying out antialiasing drawing of a curved line defined in a vector format, after the curved line is divided into minute line segments, the shortest one of the distances from each pixel to the minute line segments has to be selected.
Therefore, it is necessary to calculate the distances in advance from the center of each pixel to be drawn to all the divided minute line segments. In following patent reference 2, only linear antialiasing is described. However, it is clear that in a case in which the object is a complicated curved line, the amount of arithmetic operation of calculating distances becomes huge.
[Patent reference 1] PCT WO03/096275A2
[Patent reference 2] JP,6-274641,A (paragraph number [0014] and FIG. 1)
Because conventional graphic drawing devices are constructed as mentioned above, a problem is that in order to implement high-speed real time drawing, it is necessary to perform an arithmetic process on subpixels in parallel, and hence the hardware scale increases. A further problem is that because any edge line cannot be drawn smoothly, the occurrence of jaggy cannot be prevented certainly and the displayed image may degrade.
The present invention is made in order to solve the above-mentioned problems, and it is therefore an object of the present invention to provide a graphic drawing device and a graphic drawing method which can implement correct antialiasing drawing with a small amount of arithmetic operation without causing any degradation in the displayed image.